<template>
  <div class="validate-success">
    <img src="static/darklogo.png" class="pointer" @click="toHomePage" />
    <div class="modify-success flex column center">
      <i class="el-icon-success"></i>
      <p>{{ status ? '修改成功' : '注册成功' }}</p>
      <div class="flex center black-btn">
        <el-button style="width: 150px;" type="default" @click="login">{{ status ? '确定' : '返回登录页' }}</el-button>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      status: ''
    }
  },
  created() {
    this.status = this.$route.query.state
  },
  methods: {
    toHomePage() {
      this.$router.push('/')
    },
    login() {
      const href = 'http://l-test19.dev.cn2.corp.agrant.cn:9990/#/login?relogin=true'
      window.open(href, '_self')
    }
  }
}
</script>
<style lang="scss" scoped>
.validate-success {
  line-height: 0 !important;
  padding: 0 20px;
  img {
    height: 0.18rem;
  }
  .modify-success {
    text-align: center;
    height: calc(100vh - 100px);
    i {
      color: #0f0;
      font-size: 50px;
    }
    p {
      font-size: 20px;
      margin: 30px 0;
    }
  }
}
</style>
